register RegType a, b, c, d, e, f, g, h, i, j, k, l, m, n;
a = (RegType)1; b = (RegType)2; c = (RegType)3; d = (RegType)4; e = (RegType)5; f = (RegType)6; g = (RegType)7; h = (RegType)8; i = (RegType)9;
j = (RegType)10; k = (RegType)11; l = (RegType)12; m = (RegType)13; n = (RegType)14;
if (argc < 2) {
printf("Usage: %s #iterations.\n", argv[0]);
exit(1);
}
iterations = atol(argv[1]);
x = 0;
if (! init_dyload(argv[0])) {
printf("Something wrong in init_dyload.\n");
abort();
}
if (SETJMP(&cjb)) {
if (x++ < iterations) godeep();
printf("Got a non-zero return from xr set_jmp after %d iterations, vals: ", iterations);
dump_vars(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
exit(0);
} else {
printf("Got a zero return from xr set_jmp, vals: ");
dump_vars(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
}
a = (RegType)43; b = (RegType)43; c = (RegType)43; d = (RegType)43; e = (RegType)43; f = (RegType)43; g = (RegType)43; h = (RegType)43; i = (RegType)43;
j = (RegType)43; k = (RegType)43; l = (RegType)43; m = (RegType)43; n = (RegType)43;
use_vars(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
godeep();
exit();
}
godeep()
{
godeeper();
}
godeeper()
{
smash_regs();
}
smash_regs()
{
LONGJMP(&cjb);
}
dump_vars(a, b, c, d, e, f, g, h, i, j, k, l, m, n)
{
printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",a, b, c, d, e, f, g, h, i, j, k, l, m, n);
}
use_vars(a, b, c, d, e, f, g, h, i, j, k, l, m, n)
{
}
/* use this to get the 'level' parameter into xr_setjmp */